home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / m2gem106.lzh / CRYSTAL1.06 / SRC / CRYSTAL / AES.DEF next >
Encoding:
Modula Definition  |  1993-07-12  |  19.3 KB  |  674 lines

  1. DEFINITION MODULE AES;
  2.  
  3. (*
  4. Global AES Definitions.
  5.  
  6. UK __DATE__ __TIME__
  7. *)
  8.  
  9. (*DEF_SWITCHES*)
  10.  
  11. FROM PORTAB IMPORT ANYBYTE,ANYWORD,ANYLONG,SIGNEDWORD,UNSIGNEDWORD,
  12.                    UNSIGNEDLONG,SIGNEDBYTE,UNSIGNEDBYTE,
  13.                    BYTESET,WORDSET,ANYPOINTER;
  14.  
  15. IMPORT RcMgr;
  16.  
  17. #if export
  18. EXPORT QUALIFIED GPnt,GRect,
  19.                  ScanWord,Key,SpecialKeys,SpecialKey,
  20.                  MouseButtons,MouseButton,
  21.                  Root,MaxObject,ObjectIndex,ObjectTypes,
  22.                  ObjectFlags,ObjectFlag,None,
  23.                  ObjectStates,ObjectState,Normal,
  24.                  IBM,Small,TextAlignments,ObjectColors,
  25.                  DWhite,DBlack,DRed,DGreen,DBlue,DCyan,DYellow,DMagenta,
  26.                  ObjectField,PatternShift,PatternOffset,InsidePatterns,
  27.                  ModeShift,ModeOffset,InsideModes,TextShift,TextOffset,
  28.                  FrameShift,FrameOffset,
  29.                  MaxLen,StringRange,String,StringPtr,TEdInfo,TEdInfoPtr,
  30.                  IconColor,MaskShift,DataShift,IconBlk,IconBlkPtr,
  31.                  CIconPtr,CIcon,CIconBlk,CIconBlkPtr,
  32.                  BitBlk,BitBlkPtr,
  33.                  UserBlkPtr,ApplBlkPtr,ExtensionPtr,ObjectSpec,
  34.                  ObjectExtension,
  35.                  Nil,ObjectPtr,Object,TreePtr,
  36.                  UserDefParm,ParmBlk,UserDefFunc,UserDefCode,UserDefBlk,
  37.                  UserBlk,ApplBlk,
  38.                  ControlArray,Control,
  39.                  MaxTree,TreeIndex,TrPtr,RsHdr,RsPtr,
  40.                  GlobalBlk,Global,
  41.                  Integer,IntegerInput,IntegerOutput,IntIn,IntOut,
  42.                  Address,AddressArray,Addr,
  43.                  AESPB,c,crystal,
  44.                  Error,
  45. #if ST
  46.                  KAOS,
  47. #endif
  48.                  Version;
  49. #endif
  50.  
  51. (* point (AES.GPnt) *)
  52.  
  53. TYPE GPnt = RcMgr.GPnt;
  54.  
  55. (* rectangle (AES.GRect) *)
  56.  
  57. TYPE GRect = RcMgr.GRect;
  58.  
  59. (* key (AES.Key) *)
  60.  
  61. TYPE ScanWord = SIGNEDWORD;
  62.  
  63. #if packing
  64. #if linear
  65.      Key = RECORD
  66.              CASE: BOOLEAN OF
  67.                TRUE:
  68.                  ScanCode: ScanWord;
  69.              | FALSE:
  70.                  Scan: UNSIGNEDBYTE;
  71.                  Char: CHAR;
  72.              END;
  73.            END;
  74. #elif intel
  75. TYPE Key = RECORD
  76.              CASE: BOOLEAN OF
  77.                TRUE:
  78.                  ScanCode: ScanWord;
  79.              | FALSE:
  80.                  Char: CHAR;
  81.                  Scan: UNSIGNEDBYTE;
  82.              END;
  83.            END;
  84. #endif
  85. #else
  86. TYPE Key = ScanWord;
  87. #endif
  88.  
  89. (* special keys *)
  90.  
  91. #if revers
  92. TYPE SpecialKeys = (K15,K14,K13,K12,K11,K10,K9,K8,K7,K6,K5,K4,
  93.                     KAlt,
  94.                     KCtrl,
  95.                     KLShift,
  96.                     KRShift);
  97. #else
  98. TYPE SpecialKeys = (KRShift,
  99.                     KLShift,
  100.                     KCtrl,
  101.                     KAlt,
  102.                     K4,K5,K6,K7,K8,K9,K10,K11,K12,K13,K14,K15);
  103. #endif
  104.      SpecialKey = PACKEDSET OF SpecialKeys;
  105.  
  106. (* mouse buttons *)
  107.  
  108. #if revers
  109. TYPE MouseButtons = (Button16,Button15,Button14,Button13,Button12,Button11,
  110.                      Button10,Button9,Button8,Button7,Button6,Button5,
  111.                      Button4,Button3,
  112.                      MBRight,
  113.                      MBLeft);
  114. #else
  115. TYPE MouseButtons = (MBLeft,
  116.                      MBRight,
  117.                      Button3,Button4,Button5,Button6,Button7,Button8,
  118.                      Button9,Button10,Button11,Button12,Button13,
  119.                      Button14,Button15,Button16);
  120. #endif
  121.      MouseButton = PACKEDSET OF MouseButtons;
  122.  
  123. (* object index *)
  124.  
  125. CONST Root      =   0;
  126.       MaxObject = 512; (* arbitrary limit *)
  127.  
  128. TYPE ObjectIndex = [Root..(MaxObject - 1)];
  129.  
  130. (* object types *)
  131.  
  132. TYPE ObjectTypes = (GObjc0,GObjc1,GObjc2,GObjc3,GObjc4,GObjc5,GObjc6,GObjc7,
  133.                     GObjc8,GObjc9,GObjc10,GObjc11,GObjc12,GObjc13,GObjc14,
  134.                     GObjc15,GObjc16,GObjc17,GObjc18,GObjc19,
  135.                     GBox,
  136.                     GText,
  137.                     GBoxText,
  138.                     GImage,
  139.                     GUserDef,
  140.                     GIBox,
  141.                     GButton,
  142.                     GBoxChar,
  143.                     GString,
  144.                     GFText,
  145.                     GFBoxText,
  146.                     GIcon,
  147.                     GTitle,
  148.                     GCIcon,
  149.                     GSwButton, (* MagX *)
  150.                     GPopup,    (* MagX *)
  151.                     GObjc36,GObjc37,GObjc38,GObjc39);
  152.  
  153. (* object flags *)
  154.  
  155. #if revers
  156. TYPE ObjectFlags = (Flag15,Flag14,Flag13,Flag12,
  157.                     Submenu,
  158.                     Fl3DBak,
  159.                     Fl3DInd,
  160.                     Indirect,
  161.                     HideTree,
  162.                     TouchExit,
  163.                     LastOb,    (* [Last] [Ob]ject  *)
  164.                     RButton,   (* [R]adio [Button] *)
  165.                     Editable,
  166.                     Exit,
  167.                     Default,
  168.                     Selectable);
  169. #else
  170. TYPE ObjectFlags = (Selectable,
  171.                     Default,
  172.                     Exit,
  173.                     Editable,
  174.                     RButton,   (* [R]adio [Button] *)
  175.                     LastOb,    (* [Last] [Ob]ject  *)
  176.                     TouchExit,
  177.                     HideTree,
  178.                     Indirect,
  179.                     Fl3DInd,
  180.                     Fl3DBak,
  181.                     Submenu,
  182.                     Flag12,Flag13,Flag14,Flag15);
  183. #endif
  184.      ObjectFlag = PACKEDSET OF ObjectFlags;
  185.  
  186. CONST None = ObjectFlag{};
  187.  
  188. (* object states *)
  189.  
  190. #if revers
  191. TYPE ObjectStates = (State15,State14,State13,Stat12,State11,State10,State9,State8,
  192.                      Draw3D,
  193.                      WhiteBak,
  194.                      Shadowed,
  195.                      Outlined,
  196.                      Disabled,
  197.                      Checked,
  198.                      Crossed,
  199.                      Selected);
  200. #else
  201. TYPE ObjectStates = (Selected,
  202.                      Crossed,
  203.                      Checked,
  204.                      Disabled,
  205.                      Outlined,
  206.                      Shadowed,
  207.                      WhiteBak,
  208.                      Draw3D,
  209.                      State8,State9,State10,State11,State12,State13,State14,State15);
  210. #endif
  211.      ObjectState = PACKEDSET OF ObjectStates;
  212.  
  213. CONST Normal = ObjectState{};
  214.  
  215. (* fonts *)
  216.  
  217. CONST IBM   = 3;
  218.       Small = 5;
  219.  
  220. (* editable text justifications *)
  221.  
  222. TYPE TextAlignments = (TeLeft,TeRight,TeCntr);
  223.  
  224. (* object colors *)
  225.  
  226. TYPE ObjectColors = (White,
  227.                      Black,
  228.                      Red,
  229.                      Green,
  230.                      Blue,
  231.                      Cyan,
  232.                      Yellow,
  233.                      Magenta,
  234.                      LWhite,
  235.                      LBlack,
  236.                      LRed,
  237.                      LGreen,
  238.                      LBlue,
  239.                      LCyan,
  240.                      LYellow,
  241.                      LMagenta);
  242.  
  243. CONST DWhite   = LWhite;
  244.       DBlack   = LBlack;
  245.       DRed     = LRed;
  246.       DGreen   = LGreen;
  247.       DBlue    = LBlue;
  248.       DCyan    = LCyan;
  249.       DYellow  = LYellow;
  250.       DMagenta = LMagenta;
  251.  
  252. (* direct access to TEdInfo^.TEColor and ObjectInfo.Color bit-fields *)
  253.  
  254. TYPE ObjectField = WORDSET;
  255.  
  256. CONST PatternShift  = 4;
  257.       PatternOffset = 16;
  258.  
  259. TYPE InsidePatterns = (IPHollow,
  260.                        IP1Patt,IP2Patt,IP3Patt,IP4Patt,IP5Patt,IP6Patt,
  261.                        IPSolid);
  262.  
  263. CONST ModeShift  = 7;
  264.       ModeOffset = 128;
  265.  
  266. TYPE InsideModes = (IPTrans,IPErase);
  267.  
  268. CONST TextShift  = 8;
  269.       TextOffset = 256;
  270.  
  271. CONST FrameShift  = 12;
  272.       FrameOffset = 4096;
  273.  
  274. (* string definition (AES.String, AES.StringPtr) *)
  275.  
  276. CONST MaxLen = 81;
  277.  
  278. begin_word
  279. TYPE StringRange = [0..(MaxLen - 1)];
  280. end_word
  281.  
  282.      String = ARRAY StringRange OF CHAR;
  283.  
  284.      StringPtr = POINTER TO String;
  285.  
  286. (* text edit information *)
  287.  
  288. TYPE TEdInfo = RECORD
  289.                  TEPText    : StringPtr; (* pointer to text *)
  290.                  TEPTmplt   : StringPtr; (* pointer to template *)
  291.                  TEPValid   : StringPtr; (* pointer to validity *)
  292.                  TEFont     : UNSIGNEDWORD; (* IBM or Small *)
  293.                  TEResvd1   : ANYWORD;
  294. #if linear
  295. #if fill_byte
  296.                  FillByte: ANYBYTE;
  297. #endif
  298. #endif
  299.                  TEJust     : TextAlignments;
  300. #if intel
  301. #if fill_byte
  302.                  FillByte: ANYBYTE;
  303. #endif
  304. #endif
  305.                  TEColor    : ObjectField; (* color bit-field *)
  306.                  TEResvd2   : ANYWORD;
  307.                  TEThickness: SIGNEDWORD; (* -128..+127 *)
  308.                  TETxtLen   : StringRange; (* text length *)
  309.                  TETmpLen   : StringRange; (* template length *)
  310.                END;
  311.  
  312.      TEdInfoPtr = POINTER TO TEdInfo;
  313.  
  314. (* direct access to IconBlk^.IBColor bit-field *)
  315.  
  316. TYPE IconColor = BYTESET;
  317.  
  318. CONST MaskShift = 0;
  319.  
  320. CONST DataShift = 4;
  321.  
  322. (* icon structure *)
  323.  
  324. TYPE IconBlk = RECORD
  325.                  IBPMask: ANYPOINTER; (* pointer to mask *)
  326.                  IBPData: ANYPOINTER; (* pointer to data *)
  327.                  IBPText: StringPtr; (* pointer to text *)
  328. (*
  329. #if intel
  330.                  IBChar : CHAR; (* icon character *)
  331.                  IBColor: IconColor; (* color bit-field *)
  332. #else
  333.                  IBColor: IconColor; (* color bit-field *)
  334.                  IBChar : CHAR; (* icon character *)
  335. #endif
  336. *)
  337.                  IBChar : UNSIGNEDWORD;
  338.                  IBXChar: SIGNEDWORD; (* character position... *)
  339.                  IBYChar: SIGNEDWORD;
  340.                  IBXIcon: SIGNEDWORD; (* icon rectangle... *)
  341.                  IBYIcon: SIGNEDWORD;
  342.                  IBWIcon: UNSIGNEDWORD;
  343.                  IBHIcon: UNSIGNEDWORD;
  344.                  IBXText: SIGNEDWORD; (* text rectangle... *)
  345.                  IBYText: SIGNEDWORD;
  346.                  IBWText: UNSIGNEDWORD;
  347.                  IBHText: UNSIGNEDWORD;
  348.                  IBResvd: ANYWORD;
  349.                END;
  350.  
  351.      IconBlkPtr = POINTER TO IconBlk;
  352.  
  353. (* color icon structure *)
  354.  
  355. TYPE CIconPtr = POINTER TO CIcon;
  356.  
  357.      CIcon = RECORD
  358.                NumPlanes: UNSIGNEDWORD;
  359.                ColData  : ANYPOINTER;
  360.                ColMask  : ANYPOINTER;
  361.                SelData  : ANYPOINTER;
  362.                SelMask  : ANYPOINTER;
  363.                NextRes  : CIconPtr;
  364.              END;
  365.  
  366.      CIconBlk = RECORD
  367.                   MonoBlk : IconBlk;
  368.                   MainList: CIconPtr;
  369.                 END;
  370.  
  371.      CIconBlkPtr = POINTER TO CIconBlk;
  372.  
  373. (* bit image structure *)
  374.  
  375. TYPE BitBlk = RECORD
  376.                 BIPData: ANYPOINTER; (* pointer to data *)
  377.                 BIWB   : UNSIGNEDWORD; (* width per bytes *)
  378.                 BIHL   : UNSIGNEDWORD; (* height per lines *)
  379.                 BIX    : SIGNEDWORD; (* x-position *)
  380.                 BIY    : SIGNEDWORD; (* y-position *)
  381. #if linear
  382. #if fill_byte
  383.                 FillByte: ANYBYTE;
  384. #endif
  385. #endif
  386.                 BIColor: ObjectColors; (* bit image color *)
  387. #if intel
  388. #if fill_byte
  389.                 FillByte: ANYBYTE;
  390. #endif
  391. #endif
  392.               END;
  393.  
  394.      BitBlkPtr = POINTER TO BitBlk;
  395.  
  396. (* special object information *)
  397.  
  398. TYPE UserBlkPtr = POINTER TO UserBlk;
  399.  
  400.      ApplBlkPtr = UserBlkPtr;
  401.  
  402.      ExtensionPtr = POINTER TO ObjectExtension;
  403.  
  404.      ObjectSpec = RECORD
  405.                     CASE: ObjectTypes OF
  406.                       GObjc0:
  407.                         Address: ANYPOINTER;
  408.                     | GObjc1:
  409.                         Extension: ExtensionPtr;
  410.                     | GObjc6:
  411.                         HexCode: UNSIGNEDLONG;
  412.                     | GBox,GIBox,GBoxChar:
  413. #if packing
  414. #if linear
  415.                         Char     : CHAR; (* optional character *)
  416.                         Thickness: SIGNEDBYTE; (* -128..+127 *)
  417.                         Color    : ObjectField; (* color bit-field *)
  418. #elif intel
  419.                         Color    : ObjectField; (* color bit-field *)
  420.                         Thickness: SIGNEDBYTE; (* -128..+127 *)
  421.                         Char     : CHAR; (* optional character *)
  422. #endif
  423. #else /* not packing */
  424.                         Color    : UNSIGNEDLONG;
  425. #endif
  426.                     | GText,GFText,GBoxText,GFBoxText:
  427.                         TextInfo: TEdInfoPtr;
  428.                     | GUserDef:
  429. #if no_forward_pointers
  430.                         UserBlock: ANYPOINTER;
  431. #else
  432.                         UserBlock: UserBlkPtr;
  433. #endif
  434.                     | GIcon:
  435.                         IconBlock: IconBlkPtr;
  436.                     | GCIcon:
  437.                         CIconBlock: CIconBlkPtr;
  438.                     | GImage:
  439.                         BitBlock: BitBlkPtr;
  440.                     | GButton,GString,GTitle:
  441.                         String: StringPtr;
  442.                     ELSE
  443.                       UserSpec: ANYPOINTER;
  444.                     END;
  445.                   END;
  446.  
  447.      ObjectExtension = RECORD
  448.                          Spec: ObjectSpec;
  449.                          Parm: ANYPOINTER;
  450.                        END;
  451.  
  452. (* AES object and object tree *)
  453.  
  454. CONST Nil = -1;
  455.  
  456. TYPE ObjectPtr = [Nil..(MaxObject - 1)];
  457.  
  458. TYPE Object = RECORD
  459.                 ObNext  : ObjectPtr;
  460.                 ObHead  : ObjectPtr;
  461.                 ObTail  : ObjectPtr;
  462. #if fill_byte
  463. #  if linear
  464.                 ObExtnd : UNSIGNEDBYTE;
  465.                 ObType  : ObjectTypes;
  466. #  elif intel
  467.                 ObType  : ObjectTypes;
  468.                 ObExtnd : UNSIGNEDBYTE;
  469. #  endif
  470. #elif packing
  471. #  if linear
  472.                 ObExtnd : UNSIGNEDBYTE;
  473.                 ObType  : UNSIGNEDBYTE;
  474. #  elif intel
  475.                 ObType  : UNSIGNEDBYTE;
  476.                 ObExtnd : UNSIGNEDBYTE;
  477. #  endif
  478. #else
  479.                 ObType  : UNSIGNEDWORD;
  480. #endif
  481.                 ObFlags : ObjectFlag;
  482.                 ObState : ObjectState;
  483.                 ObSpec  : ObjectSpec;
  484.                 ObX     : SIGNEDWORD;
  485.                 ObY     : SIGNEDWORD;
  486.                 ObWidth : SIGNEDWORD;
  487.                 ObHeight: SIGNEDWORD;
  488.               END;
  489.  
  490.      TreePtr = POINTER TO ARRAY ObjectIndex OF Object;
  491.  
  492. (* parameter block *)
  493.  
  494. TYPE UserDefParm = POINTER TO UserDefBlk;
  495.  
  496.      ParmBlk = RECORD
  497.                  PBTree     : TreePtr;
  498.                  PBObj      : ObjectIndex;
  499.                  PBPrevState: ObjectState;
  500.                  PBCurrState: ObjectState;
  501.                  PBX        : SIGNEDWORD;
  502.                  PBY        : SIGNEDWORD;
  503.                  PBW        : SIGNEDWORD;
  504.                  PBH        : SIGNEDWORD;
  505.                  PBXC       : SIGNEDWORD;
  506.                  PBYC       : SIGNEDWORD;
  507.                  PBWC       : SIGNEDWORD;
  508.                  PBHC       : SIGNEDWORD;
  509.                  PBParm     : UserDefParm;
  510.                END;
  511.  
  512. #ifdef FSTM2
  513.      UserDefFunc = PROCEDURE(VAR ParmBlk): ANYWORD;
  514. #else
  515.      UserDefFunc = PROCEDURE(VAR ParmBlk): ObjectState;
  516. #endif
  517.  
  518. #if (defined LPRM2) || (defined SPCM2)
  519.      UserDefCode = PROCEDURE(VAR ParmBlk);
  520. #elif (defined ANAM2) || (defined FTLM2)
  521.      UserDefCode = UserDefFunc;
  522. #elif (defined MM2)
  523.      UserDefCode = ANYPOINTER;
  524. #elif (defined TSM2_1) || (defined TSM2_2)
  525.      UserDefCode = PROC;
  526. #elif (defined FSTM2)
  527.      UserDefCode = PROCEDURE();
  528. #elif (defined HM2) || (defined TDIM2)
  529.      UserDefCode = PROCEDURE(VAR ParmBlk);
  530. #elif (defined LM2)
  531.      UserDefCode = PROC;
  532. #else
  533.      UserDefCode = UserDefFunc;
  534. #endif
  535.  
  536.      UserDefBlk = RECORD
  537.                     Func: UserDefFunc;
  538.                     Parm: ANYPOINTER;
  539.                   END;
  540.  
  541.      UserBlk = RECORD
  542.                  UBCode: UserDefCode;
  543.                  UBParm: UserDefParm;
  544.                END;
  545.  
  546.      ApplBlk = UserBlk;
  547.  
  548. (* control array *)
  549.  
  550. TYPE ControlArray = RECORD
  551.                       OpCode     : UNSIGNEDWORD;
  552.                       SizeIntIn  : UNSIGNEDWORD;
  553.                       SizeIntOut : UNSIGNEDWORD;
  554.                       SizeAddrIn : UNSIGNEDWORD;
  555.                       SizeAddrOut: UNSIGNEDWORD;
  556.                     END;
  557.  
  558. VAR Control: ControlArray;
  559.  
  560. (* global block *)
  561.  
  562. CONST MaxTree = 512; (* arbitrary limit *)
  563.  
  564. TYPE TreeIndex = [0..(MaxTree - 1)];
  565.  
  566.      TrPtr = POINTER TO ARRAY TreeIndex OF TreePtr;
  567.  
  568.      RsHdr = RECORD
  569.                RsHVrsn   : UNSIGNEDWORD;
  570.                RsHObject : UNSIGNEDWORD;
  571.                RsHTEdInfo: UNSIGNEDWORD;
  572.                RsHIconBlk: UNSIGNEDWORD;
  573.                RsHBitBlk : UNSIGNEDWORD;
  574.                RsHFrStr  : UNSIGNEDWORD;
  575.                RsHString : UNSIGNEDWORD;
  576.                RsHImData : UNSIGNEDWORD;
  577.                RsHFrImg  : UNSIGNEDWORD;
  578.                RsHTrIndex: UNSIGNEDWORD;
  579.                RsHNObs   : UNSIGNEDWORD;
  580.                RsHNTree  : UNSIGNEDWORD;
  581.                RsHNTEd   : UNSIGNEDWORD;
  582.                RsHNIB    : UNSIGNEDWORD;
  583.                RsHNBB    : UNSIGNEDWORD;
  584.                RsHNString: UNSIGNEDWORD;
  585.                RsHNImages: UNSIGNEDWORD;
  586.                RsHRsSize : UNSIGNEDWORD;
  587.              END;
  588.  
  589.      RsPtr = POINTER TO RsHdr;
  590.  
  591.      GlobalBlk = RECORD
  592.                    ApVersion : UNSIGNEDWORD; (* GEM version *)
  593.                    ApCount   : UNSIGNEDWORD; (* number of tasks *)
  594.                    ApId      : UNSIGNEDWORD; (* application identification *)
  595.                    ApPPrivate: ObjectSpec; (* pointer to private things *)
  596.                    ApPTree   : TrPtr; (* pointer to tree array *)
  597.                    ApPMem    : RsPtr; (* pointer to resource memory *)
  598.                    ApLMem    : UNSIGNEDWORD; (* length of resource memory *)
  599.                    ApNPlanes : UNSIGNEDWORD; (* number of planes *)
  600.                    ApResvd   : ANYLONG;
  601.                  (*ApRes     : UNSIGNEDWORD; (* current resolution *)*)
  602.                  (*ApNColors : UNSIGNEDWORD; (* number of colors  *)*)
  603.                    ApBVDisk  : WORDSET; (* bit vector of floppy disk drives *)
  604.                    ApBVHard  : WORDSET; (* bit vector of hard disk drives *)
  605.                  END;
  606.  
  607. VAR Global: GlobalBlk;
  608.  
  609. (* integer input and output array *)
  610.  
  611. CONST MaxInput = 16;
  612.       MaxOutput = 7;
  613.  
  614. TYPE Integer = SIGNEDWORD;
  615.  
  616.      IntegerInput = RECORD
  617.                       CASE: UNSIGNEDWORD OF
  618.                         0:
  619.                           Array: ARRAY[0..(MaxInput - 1)] OF Integer;
  620.                       | 1:
  621.                           WH: Integer;
  622.                           WF: Integer;
  623.                           WA: ANYPOINTER;
  624.                           WO: Integer;
  625.                       ELSE
  626.                         Magic: UNSIGNEDLONG;
  627.                       END;
  628.                     END;
  629.  
  630.      IntegerOutput = ARRAY[0..(MaxOutput - 1)] OF Integer;
  631.  
  632. VAR IntIn: IntegerInput;
  633.     IntOut: IntegerOutput;
  634.  
  635. (* address array *)
  636.  
  637. CONST MaxAddress = 3;
  638.  
  639. TYPE Address = ANYPOINTER;
  640.      AddressArray = ARRAY[0..(MaxAddress - 1)] OF Address;
  641.  
  642. VAR Addr: AddressArray;
  643.  
  644. (* AES parameter block *)
  645.  
  646. TYPE AESPB = RECORD
  647.                PControl: POINTER TO ControlArray;
  648.                PGlobal : POINTER TO GlobalBlk;
  649.                PIntIn  : POINTER TO IntegerInput;
  650.                PIntOut : POINTER TO IntegerOutput;
  651.                PAdrIn  : POINTER TO AddressArray;
  652.                PAdrOut : POINTER TO Address;
  653.              END;
  654.  
  655. VAR c: AESPB;
  656.  
  657. (* AES call and AES utilities (AES.Error(), AES.Version() ) *)
  658.  
  659. #if Seimet
  660. PROCEDURE crystal;
  661. #else
  662. PROCEDURE crystal(FuncNo,NIntIn,NIntOut,NAddrIn: UNSIGNEDWORD);
  663. #endif
  664.  
  665. PROCEDURE Error(): BOOLEAN;
  666.  
  667. PROCEDURE Version(): UNSIGNEDWORD;
  668.  
  669. #if ST
  670. VAR KAOS: BOOLEAN; (* KAOS flag *)
  671. #endif
  672.  
  673. END AES.
  674.